Optimal. Leaf size=75 \[ -\frac {2 i (c+d x) \text {ArcTan}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4266, 2317,
2438} \begin {gather*} -\frac {2 i (c+d x) \text {ArcTan}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4266
Rubi steps
\begin {align*} \int (c+d x) \sec (a+b x) \, dx &=-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \int \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b}+\frac {d \int \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b}\\ &=-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {(i d) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}-\frac {(i d) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}\\ &=-\frac {2 i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 87, normalized size = 1.16 \begin {gather*} -\frac {2 i d x \text {ArcTan}\left (e^{i a+i b x}\right )}{b}+\frac {c \tanh ^{-1}(\sin (a+b x))}{b}+\frac {i d \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 128, normalized size = 1.71
method | result | size |
derivativedivides | \(\frac {-\frac {d a \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b}+c \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )+\frac {d \left (-\left (b x +a \right ) \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )+\left (b x +a \right ) \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )+i \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )-i \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(128\) |
default | \(\frac {-\frac {d a \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b}+c \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )+\frac {d \left (-\left (b x +a \right ) \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )+\left (b x +a \right ) \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )+i \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )-i \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(128\) |
risch | \(-\frac {2 i c \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {i d \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {i d \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 i d a \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(167\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 306 vs. \(2 (60) = 120\).
time = 0.41, size = 306, normalized size = 4.08 \begin {gather*} \frac {-i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right ) \sec {\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {c+d\,x}{\cos \left (a+b\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________